home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / cli / system2.arc / SYSTEM2.DOC < prev    next >
Text File  |  1989-04-19  |  77KB  |  2,118 lines

  1.  
  2.  
  3.    *******                                                     ********
  4.   ***   ***                       ***                        ***      ***
  5.   ***                             ***                                  ***
  6.    ***       ***   ***  ******  ********     ******  **********        ***
  7.     ****     ***   *** ***  ***   ***       ***  *** *** *** ***      ***
  8.        ***    ***  ***  ***       ***       ******** *** *** ***     ***
  9.         ***   *** ***     ****    ***       ***      *** *** ***    ***
  10.   ***   ***    *****   ***  ***   ***   *** ***  *** *** *** ***  ***
  11.    ******      ***      ******     ******    ******  *** *** *** ***
  12.              ***                                               ***     ***
  13. ----------****-----Operating Environment for the Atari ST-----*************--
  14.  
  15.            (C) Copyright 1989 DW Software. Written by David Wild.
  16.  
  17.  
  18.                           U S E R ' S  M A N U A L
  19.  
  20.  
  21.  
  22.  
  23.  
  24. System 2 operating environment            User's Guide         index page 1
  25. ---------------------------------------------------------------------------
  26.  
  27.                                    INDEX
  28.                                    -----
  29.    
  30.        DETAILS                                     REFERENCED UNDER
  31.  
  32.        Introduction and details                           intro
  33.        About the author                                   author
  34.        A note on the syntax used in this manual           syntax
  35.        Starting System2                                   starting
  36.        General usage of System2                           general
  37.        Special characters                                 special
  38.        Device names                                       devices
  39.        Redirection & piping                               redirection
  40.        Macros                                             macros
  41.        Variables                                          variables 
  42.        System Variables                                   system
  43.        XSL programs                                       xsl-programs
  44.        The little things in life                          oddments
  45.        Writing programs to run under System2              technical
  46.  
  47.        Internal Commands
  48.          baud                                             baud
  49.          cat                                              cat
  50.          cd                                               cd
  51.          chmod                                            chmod
  52.          clear                                            clear
  53.          contains                                         contains
  54.          cp                                               cp
  55.          date                                             date
  56.          decr                                             decr
  57.          del                                              del
  58.          dir                                              dir
  59.          diskfree                                         diskfree
  60.          drive                                            drive
  61.          echo                                             echo
  62.          else                                             else
  63.          endif                                            endif
  64.          equal                                            equal
  65.          exists                                           exists
  66.          exit                                             exit
  67.          false                                            false
  68.          getc                                             getc
  69.          goto                                             goto
  70.          if                                               if
  71.          incr                                             incr
  72.          input                                            input
  73.          istrue                                           istrue
  74.          locate                                           locate
  75.          ls                                               ls
  76.          mcat                                             mcat
  77.          mkdir                                            mkdir
  78.          mkill                                            mkill
  79.          mv                                               mv
  80.          notequal                                         notequal
  81.          path                                             path
  82.          pr                                               pr
  83.          putc                                             putc
  84.  
  85. System 2 operating environment            User's Guide         index page 2
  86. ---------------------------------------------------------------------------
  87.  
  88.                                    INDEX
  89.                                    -----
  90.    
  91.        DETAILS                                     REFERENCED UNDER
  92.  
  93.          pwd                                              pwd
  94.          quit                                             quit
  95.          ren                                              ren
  96.          result                                           result
  97.          rm                                               rm
  98.          rmdir                                            rmdir
  99.          set                                              set
  100.          time                                             time
  101.          true                                             true
  102.          type                                             type
  103.          unset                                            unset
  104.          xsl                                              xsl
  105.          .                                                .
  106.          $                                                $
  107.          *                                                *
  108.  
  109.  
  110.        External commands
  111.          help                                             help
  112.          bombs                                            bombs
  113.          tl50                                             tl50
  114.          tl25                                             tl25
  115.  
  116.        Glossary                                           glossary
  117.  
  118.          
  119.  
  120. System 2 operating environment            User's Guide         Introduction
  121. ---------------------------------------------------------------------------
  122.  
  123.  
  124.                          INTRODUCTION AND DETAILS
  125.                          ------------------------
  126.  
  127.  
  128. System 2 is an operating system shell for the Atari ST computer. It should
  129. work without problem on all versions of the computer and TOS.
  130.  
  131. What is an operating system shell (a.k.a Command Line Interpreter)?
  132.  
  133. An OS shell, like System2, provides a different method of giving commands
  134. to the computer. The usual way of controlling things on the ST is via the
  135. GEM desktop, where you drag files around, etc. with the mouse. This is all
  136. good stuff, but there are many instances when it can be restrictive, such
  137. as in copying & deleting files, formatting text, running TOS programs, etc.
  138. This is where System2 comes into it's own. It allows commands to be typed
  139. in, instead of using a graphical front end, and is in many ways similar to
  140. Unix*. Here are some of it's features:
  141.  
  142.   o  Unix Style command entry
  143.   o  Full input/output redirection & piping
  144.   o  Around 50 built-in commands
  145.   o  Ability to quickly recall the last 10 commands typed
  146.   o  Only takes up around 45K of memory
  147.   o  Aliasing and variables
  148.   o  Mini programming language with IFs and GOTOs
  149.   o  Built in expression evaluator
  150.  
  151. System2 is Copyright (C) 1989 by DW Software, and was written using
  152. Mark Williams C and assembler by: 
  153.  
  154.                     David Wild
  155.                     62 Lascelles Avenue
  156.                     Withernsea
  157.                     North Humberside
  158.                     HU19 2EB
  159.                     England
  160.  
  161.                     JANET EMAIL : WILDDJ@UK.AC.ASTON.VAXB
  162.  
  163.  
  164.  
  165.  
  166.  
  167. ----------------------------------------------------------------------------
  168. * UNIX is a registered trademark of AT&T Bell Laboratories
  169.  
  170. System 2 operating environment   User's Guide              About the author
  171. ---------------------------------------------------------------------------
  172.  
  173.                              About the author
  174.                              ================
  175.  
  176.  
  177. Hello! I'm David Wild, the author of System2, and I just thought I'd say
  178. a bit about myself. I'm 19, and am currently doing a computer science
  179. degree at Aston University in Birmingham. The idea for writing System2
  180. came from an interest in Unix, so many of the commands have a similar
  181. "Look and feel" to them (Oh dear, I shouldn't have said that. What's
  182. betting I have 100 lawsuits from AT&T through the door in a few weeks
  183. time!!). System2 isn't anywhere near as powerful as Unix (TM (R) (C) etc..)
  184. but it is hopefully a useful program.
  185.  
  186. If you have any suggestions, queries, complaints, etc., please write to me
  187. at:
  188.  
  189.                         62 Lascelles Avenue
  190.                         Withernsea
  191.                         North Humberside
  192.                         HU19 2EB
  193.  
  194. Or send JANET EMail to
  195.  
  196.                         WILDDJ@UK.AC.ASTON.VAXB 
  197.  
  198.  
  199. System 2 operating environment            User's Guide               syntax
  200. ---------------------------------------------------------------------------
  201.  
  202.  
  203.                         SYNTAX USED IN THE MANUAL
  204.                         -------------------------
  205.  
  206. The following syntax conventions are used in this manual when describing
  207. commands:
  208.  
  209. o Items of text written directly should be typed in directly
  210. o Text enclosed in < and > signifies where you should supply some
  211.   information, eg a filename
  212. o Items in square brackets, ie [ and ], are optional
  213. o Items separated by a bar (|) mean you can enter ONE of the separated
  214.   items
  215. o An ellipsis (...) means that the last item can be repeated several times
  216.  
  217. Do not confuse the < and > above with the redirection operators, or
  218. the | sign with the piping operator.
  219.  
  220. Example:
  221.  
  222.                      cat [<filespec> ... ]
  223.                      
  224.                       ^        ^      ^
  225.                      type  supplied  may be
  226.                   directly   value   repeated
  227.  
  228.                          \______  ______/
  229.                                 \/
  230.                              optional
  231.  
  232.  
  233. System 2 operating environment   User's Guide                      starting
  234. ---------------------------------------------------------------------------
  235.  
  236.                             STARTING UP SYSTEM2
  237.                             -------------------
  238.  
  239. To start up System2, insert the disk and double click on the SYSTEM2.TOS
  240. icon. System2 will only work in medium or high resolution.
  241.  
  242. System 2 operating environment   User's Guide                 general usage
  243. ---------------------------------------------------------------------------
  244.  
  245.  
  246.                          GENERAL USAGE OF SYSTEM2
  247.                          ------------------------
  248.  
  249. When you first load up System2, an introductory message will appear, and a
  250. prompt (a $ sign) will appear, which means that the computer is telling you
  251. it's waiting for you to type something (the prompt can be changed with the
  252. set command). At this prompt, you can type in a command line. A command
  253. line takes the following form:
  254.  
  255.      command [<qualifiers>] [<parameters>] [< <input>] [> <output>]
  256.  
  257. After a command line is typed, the RETURN key is pressed in order to
  258. carry out a command.
  259.  
  260. The command is the name of the command which you want to carry out, which
  261. can be either the name of an in-built command (see the internal commands
  262. section of the manual), or the name of an external command (ie a program
  263. on a disk that you wish to run. The following are examples of valid
  264. commands:
  265.  
  266.                          cat
  267.                          dir
  268.                          a:\bin\test
  269.                          utils\abc
  270.  
  271. External commands are assumed to have the filename extension .tos, .ttp
  272. or .prg. Note that GEM programs (ie that use the mouse) cannot be run
  273. under System2.
  274.  
  275. The parameters are values that are supplied to a command, such as
  276. filenames and data. The qualifiers are only used in some commands, and
  277. are a special type of parameter: they start with a '-' and consist of a 
  278. set of letters which dictate the ways in which the commands work.
  279. For example, in the dir command,
  280.  
  281.                          dir -w *.c
  282.  
  283. the w qualifier sets the dir command to work in wide mode.
  284.  
  285. The <input and >output parts define any redirection that may take place,
  286. and are discussed in the section on redirection & piping.
  287.  
  288. More than one command line can be placed on one line. Command lines are
  289. separated by a ; or a | character. A ; allows several commands to be
  290. entered on one line as if they had been typed consecutively on several
  291. lines, for example
  292.  
  293.                         dir -w ; cat
  294.  
  295. is the same as typing
  296.  
  297.                         dir -w
  298.                         cat
  299.  
  300.  
  301. System 2 operating environment   User's Guide          general usage page 2
  302. ---------------------------------------------------------------------------
  303.  
  304. If the | (pipe) character is used, then the output of one command is
  305. fed into the next. See the section on redirection & piping for more
  306. details.
  307.  
  308. A few control keys will work whilst typing, which allows simple editing.
  309. Pressing BACKSPACE deletes the last character entered. Pressing
  310. CONTROL and A restores deleted characters one by one, and CONTROL R
  311. will move back through the last 10 command lines typed, allowing you
  312. to repeat commands. For example, if you had typed "cobmands" instead
  313. of "commands", you could press BACKSPACE 6 times, type "m", then press
  314. CONTROL A five times, to restore the other deleted characters.
  315.  
  316. By default, all characters on the line are converted to upper case, and
  317. items of text cannot contain spaces (as these would be interpreted as
  318. separating parameters, etc). To remedy this, items may be placed in quotes
  319. (either double or single) which allows spaces, and text in quotes is not
  320. put into upper case. Also, items in quotes will not be treated as
  321. potential variables or be subject to macro substitution (see section on
  322. macros & variables). For example, the echo command displays it's parameters
  323. on the screen, so
  324.  
  325.                       echo hello
  326.  
  327. would display HELLO on the screen. However,
  328.  
  329.                       echo "hello"
  330. or                    echo 'hello'
  331.  
  332. would display
  333.  
  334.                       hello
  335. on the screen.
  336.  
  337. If you wish to include a quote character within quotes, use the opposite
  338. type of quotes for the text. For example,
  339.  
  340.                       echo "This is 'some' text"
  341. displays              This is 'some' text
  342.  
  343. and                   echo 'This is "some" text'
  344. displays              This is "some" text
  345.  
  346. A command line may only be 80 characters long. Unpredictable results may
  347. occur with lines longer than this.
  348.  
  349. System 2 operating environment   User's Guide            special characters
  350. ---------------------------------------------------------------------------
  351.  
  352.  
  353.                   SPECIAL CHARACTERS & CONTROL CHARACTERS
  354.                   ---------------------------------------
  355.  
  356.     CHARACTER                        USE
  357.  
  358.      " or '           For enclosing literal text
  359.  
  360.        ;              Separates commands on a line
  361.  
  362.        |              Pipes commands together
  363.  
  364.        <              Allows input redirection
  365.  
  366.        >              Allows output redirection
  367.  
  368.        %              Starts a variable name
  369.  
  370.  
  371.  
  372.     BACKSPACE         Deletes last character entered
  373.  
  374.     CONTROL A         Undelete character
  375.  
  376.     CONTROL R         Recall command line
  377.  
  378.  
  379. System 2 operating environment   User's Guide                       devices
  380. ---------------------------------------------------------------------------
  381.  
  382.  
  383.                                 DEVICES
  384.                                 -------
  385.  
  386. When using System2, there are three reserved filenames which correspond
  387. to actual physical devices - the screen, the RS232 port and the printer.
  388. The device names may be used in place of file names, and allow the
  389. devices to be treated as files. The devices are:
  390.  
  391.  
  392.     CON:                    Refers to screen for output
  393.                             & keyboard for input
  394.  
  395.     AUX:                    Refers to a device connected to the RS232 port
  396.  
  397.  
  398.     PRN:                    Refers to the printer for output.
  399.                             Inputting from this device is not possible.
  400.  
  401.  
  402. These devices are especially useful in redirection, for example,
  403.  
  404.                       echo "Hello" > prn:
  405.  
  406. prints "Hello" on the printer. By default, input and output is to the
  407. CON: device.
  408.  
  409. System 2 operating environment   User's Guide          redirection & piping
  410. ---------------------------------------------------------------------------
  411.  
  412.  
  413.                            REDIRECTION AND PIPING
  414.                            ----------------------
  415.  
  416. Most commands allow data to output to a theoretical device called the
  417. standard output (stdout) and input from a theoretical standard input
  418. (stdin). By default, the stdin and stdout are mapped to the CON: device
  419. (see section on devices), corresponding to keyboard for input and the
  420. screen for output, but these can be changed. This is known as redirection.
  421.  
  422. A device can be permanently set for stdin or stdout by using the set
  423. command. For example, after typing
  424.  
  425.                       set stdin=AUX:
  426.  
  427. all input will be taken from a device, such as a terminal, connected to the
  428. RS232 port. Correspondingly,
  429.  
  430.                       set stdout=PRN:
  431.  
  432. will send all output to the printer instead of the screen. Issuing a
  433.  
  434.                       set stdout=CON:
  435.  
  436. command will return back to normal screen output.
  437.  
  438. There is another method of redirection, which allows  a single command
  439. to output to either a device or a disk file, and input from either a
  440. device or disk file. It is carried out using the '<' and '>' symbols;
  441. '<' stands for input redirection and '>' for output redirection. These
  442. symbols, if given, should come after the command and it's parameters. The
  443. symbols are followed by either the name of a disk file, or the name of
  444. a device (CON:, AUX:, or PRN:). For example,
  445.  
  446.                       echo "Hello" > prn:
  447.  
  448. prints "Hello" on the printer
  449.  
  450.                       cat > fred.doc
  451.  
  452. Takes input from the keyboard, & puts it into file fred.doc
  453.  
  454.                       cat <bill.doc >fred.doc
  455.    
  456. Takes input from the file bill.doc and puts it into fred.doc (effectively
  457. copying file bill.doc to file fred.doc.
  458.  
  459. System2 is not fussy about whether spaces are present or not between the
  460. command and the '<' or '>' symbol, or between the symbol and the filename.
  461.  
  462. There is a special kind of output redirection to a file: if two '>' symbols
  463. are placed together, then output will be added to the end of an existing
  464. file, instead of a new file being created. For example,
  465.  
  466.                       cat bill.doc >> fred.doc
  467.  
  468. will append file bill.doc onto the end of file fred.doc.
  469.  
  470.  
  471. System 2 operating environment   User's Guide   redirection & piping page 2
  472. ---------------------------------------------------------------------------
  473.  
  474.  
  475. There is yet another kind of redirection - piping. Piping allows the
  476. output of one command to be taken as the input of another. The
  477. commands are separated by the '|' (bar) symbol. For example,
  478.  
  479.                       dir | pr -i10
  480.  
  481. will display a disk directory with a left margin of 10 spaces - the output
  482. of dir (a directory listing) is fed in as the input to the pr command
  483. which, in this case, displays it on the screen with a left margin.
  484. Piping & redirection can be mixed, so
  485.  
  486.                       dir | pr -i10 > neatdir.doc
  487.  
  488. would do the same as above, but it sends the output to a file called 
  489. neatdir.doc. Pipes can be used together, for example, if you had a disk
  490. program called uniq.ttp which removed identical lines from a file, then
  491. you could type
  492.  
  493.                       dir | uniq | pr -i10 > neatdir.doc
  494.  
  495. You cannot both redirect and pipe the output of a command - for instance,
  496.  
  497.                       dir > fred.doc | pr
  498.  
  499. is not valid.
  500.  
  501. The pipe has to create a temporary file while in use, which is deleted when
  502. no longer needed (named PIPE.TMP). The place where this is created can be
  503. set by setting the TMPPATH system variable.
  504.  
  505. Another theoretical device, stderr, exists within System2, which determines
  506. where error messages are sent. For example
  507.  
  508.                       set stderr=AUX:
  509.  
  510. sends all System2 error messages to the AUX: device. Note that this may
  511. not work with external TOS programs, since stderr is not normally defined
  512. on the ST.
  513.  
  514. Also look at - set, system variables
  515.  
  516. System 2 operating environment   User's Guide                        macros
  517. ---------------------------------------------------------------------------
  518.  
  519.  
  520.                                    MACROS
  521.                                    ------
  522.  
  523. Suppose you wanted the dir command to split it's output into pages of
  524. length 20 lines with 2 lines between pages. You can do this by typing
  525.  
  526.                       dir | pr -l20s2
  527.  
  528. but it is tedious typing this every time. However if you type in
  529.  
  530.                       set neatdir:"dir | pr -l20s2"
  531.  
  532. then every time you type in neatdir, you will get a split listing - try
  533. it! The name 'neatdir' is called a macro.
  534. Once a macro has been set as above, then EVERY occurrence of this string
  535. on the command line (except text in quotes) is replaced by the supplied
  536. string. For example, after typing
  537.  
  538.                       set much:"a load of"
  539.  
  540. then
  541.  
  542.                       echo "This is "much" rubbish"
  543.  
  544. would display         This is a load of rubbish
  545.  
  546. and                   echo thismuchrubbish
  547.  
  548. would display         THISALOADOFRUBBISH
  549.  
  550. Care should be taken - if you defined a macro, for example,
  551.  
  552.                       set in:"set stdin=aux:"
  553.  
  554. then typing
  555.  
  556.                       echo i-think-we-made-a-mess
  557.  
  558. would display         I-THSETSTDIN=AUX:K-WE-MADE-A-MESS
  559.  
  560. Macros can be unset by the mkill command or by using unset. Note that the
  561. macro name should be placed in quotes, eg
  562.  
  563.                       unset "much"
  564.  
  565. or else the name of the macro to be unset will be taken as the VALUE of
  566. much!
  567.  
  568. Commands to look at - set, unset, mkill, incr, decr, eval, echo
  569.  
  570. System 2 operating environment   User's Guide                     variables
  571. ---------------------------------------------------------------------------
  572.  
  573.  
  574.                                  VARIABLES
  575.                                  ---------
  576.  
  577. Variables are a special type of macro, and in most instances, a macro can
  578. be used in place of a variable. Variables are set up in exactly the same
  579. way as a macro, but they are distinguished from macros by putting a % sign
  580. at the start of the name, for example,
  581.  
  582.                       set %age=19
  583.  
  584. The main differences from macros are:
  585.  
  586.   o  In the input, unset, incr, etc. commands, the name of the variable
  587.      does not need to be put in quotes, eg incr %age instead of incr "age"
  588.  
  589.   o  Substitution of the value only occurs if the variable is given on
  590.      its own as a parameter, eg
  591.  
  592.                       set age="fred"
  593.                       echo 123age456
  594.  
  595.      displays         123fred456
  596.  
  597.      but              set %age="fred"
  598.                       echo 123%age456
  599.  
  600.      displays         123%age456
  601.  
  602.   
  603. Variables' values can be easily changed with the set, incr and decr
  604. commands. See the relevant sections for details.
  605.  
  606. System 2 operating environment   User's Guide              system variables
  607. ---------------------------------------------------------------------------
  608.  
  609.  
  610.                              SYSTEM VARIABLES
  611.                              ----------------
  612.  
  613. There are several variables which are already defined in System2. These
  614. can be split into two types - ones which can be set with the Set command,
  615. and ones which cannot. If system variables are being set with the set
  616. command, then the % sign is not entered - eg to set the %stderr system
  617. variable to AUX:, you would enter
  618.  
  619.                  set stderr=aux:
  620.  
  621. but you would still type
  622.  
  623.                  echo %stderr
  624.  
  625.  
  626. System variables which can be set:
  627. ----------------------------------
  628.  
  629. NAME            POSSIBLE VALUES     DESCRIPTION
  630.  
  631. %colour             0-3             Sets colour pen used for text output
  632.  
  633. %echo              ON or OFF        Determines whether text input is
  634.                                     echoed on the standard output (useful
  635.                                     for entering passwords and on echoing
  636.                                     terminals
  637. %lf                ON or OFF        Sets if linefeeds contain LF character
  638.  
  639. %paper              0-3             Sets colour pen used for background
  640.  
  641. %prompt           any string        Contains system prompt
  642.  
  643. %stderr          CON: AUX: or PRN:  Standard error device
  644.  
  645. %stdin           CON: AUX: or PRN:  Standard input device
  646.  
  647. %stdout          CON: AUX: or PRN:  Standard output device
  648.  
  649. %syscol             0-3             Colour pen used for text input
  650.  
  651. %tmppath          pathname          place where temporary pipe files are
  652.                                     stored
  653.  
  654. System variables which can't be set:
  655. ------------------------------------
  656.  
  657. %result          Contains returned result of last command
  658.  
  659. screenres       Contains screen resolution - 0=low, 1=medium, 2=high
  660.  
  661. System 2 operating environment   User's Guide                  xsl-programs
  662. ---------------------------------------------------------------------------
  663.  
  664.  
  665.                                XSL PROGRAMS
  666.                                ------------
  667.  
  668. System2 has a batch programming facility known as XSL (eXternal Script
  669. Language). This allows System2 commands to be placed in sequence in a file,
  670. and this file is read in using the xsl command, and the commands are
  671. executed as if they had been typed into System2. Simple programming
  672. constructs are catered for, namely IF and GOTO.
  673.  
  674. Files containing XSL programs should have the extension .XSL. Some sample
  675. XSL files are provided in the directory SAMPLE.XSL. XSL programs can be
  676. created with any text editor, such as the micro emacs editor.
  677.  
  678. XSL programs can be passed parameters like programs. These paramaters are
  679. assigned to variables %1, %2, ... etc up to %9. So if an XSL program
  680. was run as follows (assuming it was called fred.xsl):
  681.  
  682.                     XSL fred hello there
  683.  
  684. then %1 would equal HELLO and %2 would equal THERE. Another variable,
  685. %argc, contains the number of parameters supplied.
  686.  
  687. If a file PROFILE.XSL exists in the same directory as System2, then when
  688. System2 is executed, this XSL program is read in and executed.
  689.  
  690. See also: xsl, if, goto
  691.  
  692. System 2 operating environment   User's Guide                      oddments
  693. ---------------------------------------------------------------------------
  694.  
  695.  
  696.                        The Little things in life...
  697.                        ----------------------------
  698.  
  699. Here are some handy uses of System2 which may not be immediately obvious...
  700.  
  701. Printing out files
  702. ------------------
  703. Often, you want to print a file on the printer to put into a binder, say.
  704. Unfortunately, the GEM printing function does not have any formatting
  705. capabilities. Using the pr command, you can set the left hand margin, and
  706. split the file into neat pages for printing.
  707.  
  708. Sending control codes to the printer
  709. ------------------------------------
  710. If you wish to set your printer to a certain print mode, then this can
  711. easily be done using the putc command.
  712.  
  713. Copying files
  714. -------------
  715. The cp and cat commands are much more powerful than the GEM equivalents
  716.  
  717. Putting control codes at the start or end of files
  718. --------------------------------------------------
  719. To do this, use the putc command to create a file with the control codes
  720. in, and use the cat command to join the files, or use the appending
  721. redirection (>>).
  722. ~
  723. System 2 operating environment   User's Guide                     technical
  724. ---------------------------------------------------------------------------
  725.  
  726.  
  727.                    Writing programs to run under System2
  728.                    -------------------------------------
  729.  
  730. When System2 loads up an external program, it passes to it a command line
  731. containing the parameters, and also an environment string which contains:
  732.  
  733. (i) The name of a file used for input redirection, or a space if non exists
  734.  
  735. (ii) A space
  736.  
  737. (iii) The name of the current stderr device (CON:, AUX:, or PRN:)
  738.  
  739.  
  740. These can be used in C by the following main construct:
  741.  
  742.     main(argc,argv,envp) int argc; char *argv[]; char *envp[];
  743.     {
  744.       /* your program */
  745.     }
  746.  
  747. argc contains the number of parameters, argv[1]..argv[argc] contains
  748. the parameters, and envp[0] contains the environment string.
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.                                  SYSTEM 2
  763.  
  764.  
  765.                          COMMAND REFERENCE GUIDE
  766.  
  767. System 2 operating environment   User's Guide - Internal Commands      baud
  768. ---------------------------------------------------------------------------
  769.  
  770. Command          baud
  771. Syntax           baud <rate>
  772.  
  773. The baud command allows the baud rate for the RS232 port (referenced as
  774. AUX: under System2) to be set. The <rate> parameter refers to the baud
  775. rate, and can be one of the following values: 19200,9600,4800,3600,2400,
  776. 2000,1800,1200,600,300,200,150,134,110,75,50. The default baud rate on
  777. the ST is 9600 baud.
  778.  
  779. Examples:
  780.                  baud 9600
  781.                  baud 75
  782. ~
  783. System 2 operating environment   User's Guide - Internal Commands       cat
  784. ---------------------------------------------------------------------------
  785.  
  786. Command          cat
  787. Syntax           cat [<filespec> ... ]
  788.  
  789. The primary function of the cat command is to join files together
  790. (concatenation, hence the command name cat). However, it serves many
  791. other purposes.
  792. The cat command can be supplied with one or more parameters, each of which
  793. can be a filename or a file specification containing wildcards. All
  794. files which match the file specifications are joined together, and the
  795. result is sent to standard output. If no parameters are supplied, then
  796. input is taken from the standard input.
  797. cat is very useful for use with redirection, as shown in the examples
  798. below:
  799.  
  800. Examples:
  801.  
  802.   cat > fred.doc              Copies input from the keyboard to fred.doc
  803.   cat fred.doc                Displays the file fred.doc on the screen
  804.   cat fred.doc bill.doc       Displays fred.doc and bill.doc
  805.   cat fred.doc > bill.doc     Copies file fred.doc to file bill.doc
  806.   cat a*.* b*.*               Displays all files starting with a or b
  807.   cat *.c fred.doc            Displays all files ending in .c, followed
  808.                                 by fred.doc
  809.   cat ch1.wp ch2.wp > book.wp Makes a new file book.wp containing ch1.wp
  810.                                 and ch2.wp joined together.
  811.   cat ch3.wp >>book.wp        Adds ch3.wp on to the end of book.wp
  812.   cat fred.doc > prn:         Sends file fred.doc to the printer
  813.   cat < fred.doc              Displays the file fred.doc on the screen
  814.   cat <aux: >prn:             Takes input from a console connected to the
  815.                               RS232 port, and sends it to the printer.
  816.  
  817. Notes:
  818.  
  819. If input is taken from the keyboard and redirected to another output, as
  820. in the first example above, the typed information will still be displayed
  821. on the screen to allow for verification.
  822.  
  823. If input is taken from the keyboard, or a redirected input, then as soon
  824. as a CONTROL Z character is encountered (character 27), then input is
  825. terminated. So, in the first example above, you would type the information
  826. that you wished to be in the file fred.doc, then hold down the CONTROL key
  827. and press Z to end the input. CONTROL Z's in unredirected files are treated
  828. as any other character.
  829.  
  830. Pressing CONTROL S and CONTROL Q during displaying a file on the screen will
  831. cause the screen to freeze and be released, enabling text to be viewed
  832. before it scrolls off the screen. Do not press CONTROL C during output, or
  833. else you may be aborted to the desktop.
  834.  
  835. Note that pressing return while typing into a file using cat will only
  836. result in a carriage return being sent (sending the cursor to the left
  837. of the screen). To send a line feed (go to next line), press CONTROL J.
  838.  
  839. See also: type, cp, echo
  840.  
  841. System 2 operating environment   User's Guide - Internal Commands        cd
  842. ---------------------------------------------------------------------------
  843.  
  844. Command          cd
  845. Syntax           cd <path>
  846.  
  847. This command changes the current directory to the given path. All further
  848. commands (eg ls) will now operate on files in this directory. It is similar
  849. to double clicking on a folder from GEM.
  850.  
  851. To return to the root directory (the default, top level directory that
  852. contains all other directories and files), enter
  853.  
  854.                  cd \
  855.  
  856. Examples:
  857.                  cd \bin
  858.                  cd database\customer
  859.  
  860. See also: mkdir, rmdir, pwd, drive
  861.  
  862.  
  863. System 2 operating environment   User's Guide - Internal Commands     chmod
  864. ---------------------------------------------------------------------------
  865.  
  866. Command          chmod
  867. Syntax           chmod <hrw> file
  868.  
  869. The chmod command allows the read/write and visibility status of a file
  870. to be altered. The first parameter consists of three flags, each of
  871. which can be the character shown above, or a dash ('-'). If the character
  872. is supplied, then the status corresponding to that character is set to on,
  873. otherwise it is set to off. h stands for hidden (ie not shown on the
  874. desktop), r for read access, and w for write access.
  875.  
  876. Examples:
  877.   chmod -rw fred.doc            Sets fred.doc to be visible, readable,
  878.                                 and writable
  879.   chmod hrw fred.doc            Sets fred.doc to be hidden, readable, and
  880.                                 writable
  881.   chmod -r- fred.doc            Sets fred.doc to be visible and read only
  882.   chmod hr- fred.doc            Sets fred.doc to be hidden and read only
  883.  
  884. Notes:
  885.  
  886. If a file is set to read only (ie r- as opposed to rw) then it cannot be
  887. altered or erased unless it's status is set back to rw. All files must
  888. be readable, so the r flag is compulsory, and only included for
  889. familiarity with Unix users. Any other characters apart from h, r & w
  890. in their appropriate positions are treated as being equivalent to a dash.
  891.  
  892. System 2 operating environment   User's Guide - Internal Commands     clear
  893. ---------------------------------------------------------------------------
  894.  
  895. Command          clear
  896. Syntax           clear
  897.  
  898. The clear command clears the screen, and sets the cursor position to the
  899. upper left hand corner of the screen.
  900.  
  901. Example:
  902.                  clear
  903.  
  904. See also: locate
  905.  
  906. System 2 operating environment   User's Guide - Internal Commands  commands
  907. ---------------------------------------------------------------------------
  908.  
  909. Command          commands
  910. Syntax           commands
  911.  
  912. This commands produces a list of all the built-in System2 commands.
  913.  
  914. Example:
  915.  
  916.                  commands
  917.  
  918. Notes:
  919.  
  920. The list does not include the commands command!
  921.  
  922. System 2 operating environment   User's Guide - Internal Commands  contains
  923. ---------------------------------------------------------------------------
  924.  
  925. Command          contains
  926. Syntax           contains <string1> <string2>
  927.  
  928. The contains command returns a value of true (0) if <string2> is contained
  929. in <string1>, or false (-1) if it isn't. It is intended for use with the if
  930. command, for example,
  931.  
  932.          if contains %birdname "gull" ; echo "Seabird" ; echo ; endif
  933.  
  934. would print 'Seabird' on the screen if the variable %birdname contains
  935. the string 'gull'. All tests are case sensitive.
  936.  
  937. Examples:
  938.  
  939.   contains "this is some text" "some"             returns 0
  940.   contains "this is some text" "SOME"             returns -1
  941.   contains "this is some text" some               returns -1
  942.   contains "this is SOME text" some               returns 0
  943.   contains thisissometext some                    returns 0
  944.  
  945. Notes:
  946.  
  947. All tests are case sensitive, so "FRED" will not match 'Fred','fred', etc.
  948.  
  949. See also: equal, notequal, istrue
  950.  
  951. System 2 operating environment   User's Guide - Internal Commands        cp
  952. ---------------------------------------------------------------------------
  953.  
  954. Command          cp
  955. Syntax           cp <filespec> <destfilespec>
  956.  
  957. The cp command is used to copy files from one place to another (akin to
  958. dragging files using the GEM desktop, only more powerful). The <filespec>
  959. parameter describes the source file(s), and can contain wildcards. The
  960. <destfilespec> parameter either specifies the path to which the files are
  961. to be copied, or supplies the path/file name of a single file. Except in
  962. the latter case, files will be given the same names as the files that
  963. are being copied.
  964.  
  965. Examples:
  966.                  cp a:*.c b:\source
  967.                  cp *.c source
  968.                  cp fred.dat b:
  969.                  cp fred.dat b:john.dat
  970.                  cp a:\source\*.c d:\src
  971.  
  972. Notes:
  973.  
  974. Copying multiple files to one destination file (eg cp *.c b:fred.dat) is
  975. allowed, but will result in only the last file being copied. If you wish
  976. to create a composite file, use the cat command.
  977.  
  978. See also: cat, type
  979.  
  980. System 2 operating environment   User's Guide - Internal Commands      date
  981. ---------------------------------------------------------------------------
  982.  
  983. Command          date
  984. Syntax           date [<dd> <mm> <yyyy>]
  985.  
  986. The date command will display the current date, or will allow the date to
  987. be set if the three parameters (corresponding to day, month, year) are
  988. supplied. The month is in numeric format (1-12) and the year is in four
  989. digit format (1980-2099).
  990.  
  991. Examples:
  992.                  date
  993.                  date 2 4 1989
  994.                  date 14 8 1985
  995.  
  996. Notes:
  997.  
  998. Validity checking is carried out on the dates, but this does not extend to
  999. preventing the date being set to 30 February, 31 September, etc. 
  1000.  
  1001. See also: time
  1002.  
  1003. System 2 operating environment   User's Guide - Internal Commands      decr
  1004. ---------------------------------------------------------------------------
  1005.  
  1006. Command          decr
  1007. Syntax           decr <variable>
  1008.  
  1009. The decr command will subtract 1 from the value held in a variable.
  1010.  
  1011. Examples:
  1012.                  decr %count
  1013.                  decr %value
  1014.  
  1015. decr is very useful if used in a loop in an xsl program. For example, the
  1016. xsl program:
  1017.  
  1018.                  set %count=10
  1019.                  . loop
  1020.                  echo "Hello"
  1021.                  echo
  1022.                  decr %count
  1023.                  if istrue %count}0 ; goto loop ; endif
  1024.                  exit
  1025.  
  1026. will display "Hello" 10 times
  1027.  
  1028. Notes:
  1029.  
  1030. All arithmetic is in two byte integer form; decrementing below -32768 will
  1031. cause spurious results.
  1032. This command is equivalent to a two byte form of
  1033.                  set <variable>=<variable>-1
  1034.  
  1035. See also: incr, set, xsl
  1036.  
  1037. System 2 operating environment   User's Guide - Internal Commands       del
  1038. ---------------------------------------------------------------------------
  1039.  
  1040. Command          del
  1041. Syntax           del <filespec>
  1042.  
  1043. This command is used to remove disk files that are no longer needed. A
  1044. removed file CANNOT BE RECOVERED.
  1045.  
  1046. The filespec parameter can be a single filename, in which case the given
  1047. file is deleted, or a wildcard, in which case all files that match the
  1048. specification are deleted.
  1049.  
  1050. Obviously, this command must be used with great care. If you wish, the
  1051. command RM can be used in place of DEL.
  1052.  
  1053. Examples:
  1054.                  del fred.doc
  1055.                  del *.c
  1056.  
  1057. See also: rm, rmdir
  1058.  
  1059. System 2 operating environment   User's Guide - Internal Commands       dir
  1060. ---------------------------------------------------------------------------
  1061.  
  1062. Command          dir
  1063. Syntax           dir [-[aw]] [<filespec>]
  1064.  
  1065. This command displays a list of all the files that are stored on a disk.
  1066. It is basically the same as the ls command, except that it produces an
  1067. MS-DOS(tm) style directory.
  1068.  
  1069. If the -w (wide) qualifier is specified, only the names of the files or
  1070. directories that match the filespec are output, and no distinction is made
  1071. between subdirectories and files. If the -w qualifier is not given, then the
  1072. output is of the form:
  1073.  
  1074.         <name> <file size> <date & time of creation> <file status>
  1075.  
  1076. The file status is given as a decimal number. This is the standard ST
  1077. attribute byte.
  1078.  
  1079. If the -a qualifier is specified, then all files that match the filespec
  1080. are shown, including system files that are normally hidden from the directory
  1081. list.
  1082.  
  1083. After the file list, the number of files matching the specification is shown
  1084. together with the number of bytes consumed by these files.
  1085.  
  1086. The optional filespec parameter can be (i) a filename with wildcards,
  1087. (ii) a disk drive letter followed by a colon, or (iii) a combination of
  1088. disk drive letter and filename.
  1089.  
  1090. Examples:
  1091.                 dir
  1092.                 dir *.c
  1093.                 dir -w a:\data\*.bak
  1094.                 dir -aw c:
  1095.  
  1096. See also: ls,cd,drive,pwd
  1097.  
  1098. System 2 operating environment   User's Guide - Internal Commands  diskfree
  1099. ---------------------------------------------------------------------------
  1100.  
  1101. Command          diskfree
  1102. Syntax           diskfree [<drive letter>]
  1103.  
  1104. This command will show the amount of free space left on the specified
  1105. drive, or the current drive if none is specified. The message returned
  1106. is of the form:
  1107.  
  1108.                  n bytes free out of m
  1109.  
  1110. where n is the disk space free, and m is the total storage capability of
  1111. the disk.
  1112.  
  1113. Notes:
  1114.  
  1115. The amount of space used is displayed with the dir or ls commands.
  1116.  
  1117. See also: dir, ls
  1118.  
  1119. System 2 operating environment   User's Guide - Internal Commands     drive
  1120. ---------------------------------------------------------------------------
  1121.  
  1122. Command          drive
  1123. Syntax           drive <drive letter>
  1124.  
  1125. The drive command sets the default disk drive that is used by all commands.
  1126. <drive letter> must be in the range A-P, and the drive must exist. Drive A
  1127. corresponds to the first disk drive, and drive B to the second if you have
  1128. one fitted.
  1129.  
  1130. Examples:
  1131.                  drive a
  1132.                  drive d
  1133.  
  1134. See also: cd
  1135.  
  1136. System 2 operating environment   User's Guide - Internal Commands      echo
  1137. ---------------------------------------------------------------------------
  1138.  
  1139. Command          echo
  1140. Syntax           echo [<string1> <string2> ...]
  1141.  
  1142. This command outputs it's parameters to the standard output. No carriage
  1143. return is issued after the text is written. To issue a carriage return, use
  1144. echo without any parameters.
  1145.  
  1146. It is advisable to put direct text within quotes, otherwise it will be
  1147. converted to upper case, and will be subject to macro substitution.
  1148.  
  1149. Example session:
  1150.  
  1151. $ echo Hello
  1152. HELLO$ echo "Hello World"
  1153. Hello World$ echo "Hello World"; echo
  1154. Hello World
  1155. $ set %fred="Hello World"
  1156. $ echo %fred
  1157. Hello World$ echo Hello There World
  1158. HELLOTHEREWORLD$
  1159.  
  1160. System 2 operating environment   User's Guide - Internal Commands      else
  1161. ---------------------------------------------------------------------------
  1162.  
  1163. Command          else
  1164. Syntax           else
  1165.  
  1166. The else command is intended for use with the if statement. It will execute
  1167. all commands up to the corresponding endif statement, if the result of
  1168. the last if operation was false (ie non zero). For further details, see
  1169. the if command.
  1170.  
  1171. Example:
  1172.                  else
  1173.  
  1174. See also: if, endif
  1175.  
  1176. System 2 operating environment   User's Guide - Internal Commands     endif
  1177. ---------------------------------------------------------------------------
  1178.  
  1179. Command          endif
  1180. Syntax           endif
  1181.  
  1182. The endif command signifies the end of a conditional block of code
  1183. controlled by an if statement. For further details, see the if command.
  1184.  
  1185. Example:
  1186.                  endif
  1187.  
  1188. See also: if, else
  1189.  
  1190. System 2 operating environment   User's Guide - Internal Commands     equal
  1191. ---------------------------------------------------------------------------
  1192.  
  1193. Command          equal
  1194. Syntax           equal <string1> <string2>
  1195.  
  1196.  
  1197. The equal command returns a value of true (0) if <string2> is the same as
  1198. <string1>, or false (-1) if it isn't. It is intended for use with the if
  1199. command, for example,
  1200.  
  1201.        if equal %birdname "puffin" ; echo "Seabird" ; echo ; endif
  1202.  
  1203. would print 'Seabird' on the screen if the variable %birdname was equal to
  1204. the string 'puffin'. All tests are case sensitive.
  1205.  
  1206. Examples:
  1207.  
  1208.   equal "fred" "fred"                             returns 0
  1209.   equal "Fred" "fred"                             returns -1
  1210.   equal "fred" fred                               returns -1
  1211.   equal "fred" "james"                            returns 0
  1212.   equal fred fred                                 returns 0
  1213.  
  1214. Notes:
  1215.  
  1216. All tests are case sensitive, so "FRED" will not match 'Fred','fred', etc.
  1217.  
  1218. See also: notequal, contains, istrue
  1219.  
  1220. System 2 operating environment   User's Guide - Internal Commands      eval
  1221. ---------------------------------------------------------------------------
  1222.  
  1223. Command          eval
  1224. Syntax           eval <expression> [<expression> ...]
  1225.  
  1226. The eval command will evaluate a number of supplied expressions, and will
  1227. print the results out on the standard output. An expression can consist
  1228. of any one of the following:
  1229.  
  1230. (i) A numeric value, which is a number or a variable that gives a number.
  1231.     Examples: 5, 300000, 12345678, %age, %value
  1232.  
  1233. (ii) A number of numeric values separated by operators
  1234.      Examples: 5*8, 3+2*5, %age*2+71, %age/2=%value*50
  1235.  
  1236. Valid operators are (in order of precedence):
  1237.  
  1238. * (multiply)    / (divide)      + (add)         - (subtract)
  1239. = (equal)       { (less than)   } (greater than)
  1240.  
  1241. If a non-numeric & non-variable string is found, it will yield a value of
  1242. zero.
  1243.  
  1244. Examples:
  1245.                  eval 3*8+%age %age}17 3*3=9
  1246.  
  1247. - which, supposing age=15, results in 39 0 1 being displayed on the screen.
  1248.  
  1249. Notes:
  1250.  
  1251. All arithmetic is integer, ie no decimal points are allowed. The =
  1252. operator yields 1 if the expressions to either side are equal, or 0 if
  1253. they are not. Similarly { and } yield 1 if the left expression is less
  1254. or greater than the right expression respectively, otherwise 0. These
  1255. symbols were chosen instead of the more common < and > in order to avoid
  1256. possible confusion with the redirection symbols < and >.
  1257.  
  1258. See also: istrue, echo
  1259.  
  1260. System 2 operating environment   User's Guide - Internal Commands    exists
  1261. ---------------------------------------------------------------------------
  1262.  
  1263. Command          exists
  1264. Syntax           exists <filespec>
  1265.  
  1266. This command returns true (0) if a file exists that matches the given
  1267. file specification, otherwise it returns false (-1).
  1268.  
  1269. Examples:
  1270.                  exists fred.doc
  1271.                  exists *.c
  1272.                  exists *.*
  1273.  
  1274. Notes:
  1275.  
  1276. The primary use of exists is in conjunction with the if statement in xsl
  1277. program. For example, the xsl segment
  1278.  
  1279.                  if exists "database.def"
  1280.                    * do nothing
  1281.                  else
  1282.                    echo "You need to create a database.def file!"
  1283.                    echo
  1284.                    exit -1
  1285.                  endif
  1286.  
  1287. would exit with a suitable error message if the file database.def does
  1288. not exist.
  1289.  
  1290. See also: if, xsl, $
  1291.  
  1292. System 2 operating environment   User's Guide - Internal Commands      exit
  1293. ---------------------------------------------------------------------------
  1294.  
  1295. Command          exit
  1296. Syntax           exit [<value>]
  1297.  
  1298. The exit command will stop execution of an xsl procedure, and return the
  1299. user to the System2 prompt. If a value is specified, this will be returned
  1300. to System2 as the return value of the xsl command, zero being returned by
  1301. default.
  1302.  
  1303. Examples:
  1304.                  exit
  1305.                  exit -1
  1306.  
  1307. See also: xsl, quit
  1308.  
  1309. System 2 operating environment   User's Guide - Internal Commands     false
  1310. ---------------------------------------------------------------------------
  1311.  
  1312. Command          false
  1313. Syntax           false
  1314.  
  1315. This command returns the value false (-1).
  1316.  
  1317. See also: true
  1318.  
  1319. System 2 operating environment   User's Guide - Internal Commands      getc
  1320. ---------------------------------------------------------------------------
  1321.  
  1322. Command          getc
  1323. Syntax           getc
  1324.  
  1325. The getc command allows a single character to be input from the standard
  1326. input (the keyboard in most circumstances). It returns a value between
  1327. 0 and 255 corresponding to the ASCII value of the character that was
  1328. typed. If the input is from the keyboard (CON:, the default), then the
  1329. character is echoed on the screen.
  1330.  
  1331. Example:
  1332.                  getc
  1333.  
  1334. See also: putc, input
  1335.  
  1336. System 2 operating environment   User's Guide - Internal Commands      goto
  1337. ---------------------------------------------------------------------------
  1338.  
  1339. Command          goto
  1340. Syntax           goto label
  1341.  
  1342. The goto command is for use in xsl procedures, and causes a branch to
  1343. a part of the program that is labelled with the given label. A label
  1344. consists of a line in the program that contains a decimal point followed
  1345. by a space and the label name. See the decr command for a demonstration
  1346. of goto.
  1347.  
  1348. Example:
  1349.                  goto loop
  1350.  
  1351. See also: xsl,. ,decr
  1352.  
  1353. System 2 operating environment   User's Guide - Internal Commands        if
  1354. ---------------------------------------------------------------------------
  1355.  
  1356. Command          if
  1357. Syntax           if <command-line>
  1358.  
  1359. The if command allows commands to be executed only in certain
  1360. circumstances. The if command is followed by any System2 command line, and
  1361. it executes all commands up to the corresponding else or endif statement
  1362. only if this command line returns a value of true (0). This makes it
  1363. especially useful with the contains, equal, exists, false, istrue, and
  1364. true commands. Any commands between an else and an endif command are
  1365. executed only if the command line returns false (non zero). After the
  1366. endif, all processing carries on as normal. The if command is usually used
  1367. in two ways, either directly typed into System2, as in
  1368.  
  1369.     if istrue %age}17 ; echo "you can vote" ; echo ; endif
  1370.  
  1371. which displays "you can vote" if %age is greater than 17 (note the use of
  1372. the semicolon to separate the commands), or in an xsl program, such as the
  1373. segment below:
  1374.  
  1375.                  if istrue %age}17
  1376.                    echo "you can vote"
  1377.                    echo
  1378.                  else
  1379.                    echo "you can't vote"
  1380.                    echo
  1381.                  endif
  1382.  
  1383. Notes:
  1384.  
  1385. Nested ifs are allowed, provided they are all finished off with a
  1386. corresponding endif.
  1387.  
  1388. See also: else, endif, contains, equal, exists, false, istrue, true, xsl
  1389.  
  1390. System 2 operating environment   User's Guide - Internal Commands      incr
  1391. ---------------------------------------------------------------------------
  1392.  
  1393. Command          incr
  1394. Syntax           incr <variable>
  1395.  
  1396. The incr command will add 1 to the value held in a variable.
  1397.  
  1398. Examples:
  1399.                  incr %count
  1400.                  incr %value
  1401.  
  1402. incr is very useful if used in a loop in an xsl program. For example, the
  1403. xsl program:
  1404.  
  1405.                  set %count=0
  1406.                  . loop
  1407.                  echo "Hello"
  1408.                  echo
  1409.                  incr %count
  1410.                  if istrue %count{10 ; goto loop ; endif
  1411.                  exit
  1412.  
  1413. will display "Hello" 10 times
  1414.  
  1415. Notes:
  1416.  
  1417. All arithmetic is in two byte integer form; incrementing over 32767 will
  1418. cause spurious results.
  1419. This command is equivalent to a two byte form of
  1420.                  set <variable>=<variable>+1
  1421.  
  1422. See also: decr, set, xsl
  1423.  
  1424. System 2 operating environment   User's Guide - Internal Commands     input
  1425. ---------------------------------------------------------------------------
  1426.  
  1427. Command          input
  1428. Syntax           input <variable> [<prompt>]
  1429.  
  1430. The input command allows a line of text to be input from the keyboard, and
  1431. this text is assigned to the specified variable, as if the set command
  1432. had been used. If the prompt parameter is supplied, then this prompt is
  1433. displayed on standard output before the user is allowed to input. If no
  1434. prompt is supplied, then a dash ('-') is output as a prompt.
  1435.  
  1436. Examples:
  1437.                  input %name
  1438.                  input %name "Please enter your name>"
  1439.  
  1440. Notes:
  1441.  
  1442. If you do not wish a prompt to be output, then use input <variable> ""
  1443.  
  1444. See also: getc
  1445.  
  1446. System 2 operating environment   User's Guide - Internal Commands    istrue
  1447. ---------------------------------------------------------------------------
  1448.  
  1449. Command          istrue
  1450. Syntax           istrue <expression>
  1451.  
  1452. This command yields a value of true (0) if the given expression is true,
  1453. else it returns a value of false. For a description of an expression, see
  1454. the eval command. The istrue command is very useful if used in conjunction
  1455. with the if command, as shown in the example below:
  1456.  
  1457.   if istrue %size}1000 ; echo "Size too large" ; endif
  1458.  
  1459. Examples:
  1460.                  istrue %fred+2=%bill-1
  1461.                  istrue %fred
  1462.  
  1463. See also: eval, equal, notequal
  1464.  
  1465. System 2 operating environment   User's Guide - Internal Commands    locate
  1466. ---------------------------------------------------------------------------
  1467.  
  1468. Command          locate
  1469. Syntax           locate x y
  1470.  
  1471. The locate command will allow the cursor to be positioned on the screen.
  1472. The given x and y coordinates begin at 0, and are relative to the top left
  1473. of the screen. Usually, x should be from 0 to 79 and y from 0 to 24.
  1474.  
  1475. See also: clear
  1476.  
  1477. System 2 operating environment   User's Guide - Internal Commands        ls
  1478. ---------------------------------------------------------------------------
  1479.  
  1480. Command          ls
  1481. Syntax           ls [-[la]][<filespec>]
  1482.  
  1483. This command displays a list of all the files that are stored on a disk.
  1484.  
  1485. Unless the -l (long) qualifier is specified, only the names of the files or
  1486. directories that match the filespec are output, and no distinction is made
  1487. between subdirectories and files. If the -l qualifier is given, then the
  1488. output is of the form:
  1489.  
  1490.         <file status> <file size> <date & time of creation> <name>
  1491.  
  1492. The file status is given as three characters. An r indicates that the file
  1493. can be read (always the case), a w indicates that the file can be written
  1494. to (not read only), and a d indicates a subdirectory.
  1495.  
  1496. If the -a qualifier is specified, then all files that match the filespec
  1497. are shown, including system files that are normally hidden from the directory
  1498. list.
  1499.  
  1500. After the file list, the number of files matching the specification is shown
  1501. together with the number of bytes consumed by these files.
  1502.  
  1503. The optional filespec parameter can be (i) a filename with wildcards,
  1504. (ii) a disk drive letter followed by a colon, or (iii) a combination of
  1505. disk drive letter and filename.
  1506.  
  1507. Examples:
  1508.                 ls
  1509.                 ls *.c
  1510.                 ls -l a:\data\*.bak
  1511.                 ls -al c:
  1512.  
  1513. See also: dir, cd, drive, pwd
  1514.  
  1515. System 2 operating environment   User's Guide - Internal Commands      mcat
  1516. ---------------------------------------------------------------------------
  1517.  
  1518. Command          mcat
  1519. Syntax           mcat <macro> <string>
  1520.  
  1521. The mcat command will append a string to the end of a macro or variable,
  1522. and reassigns the resulting string to the macro or variable. An example
  1523. use of this in an xsl procedure is shown below:
  1524.  
  1525.                  * Input full name
  1526.                  input %initials "Enter initials>"
  1527.                  input %surname "Enter surname>"
  1528.                  set %name=%initials
  1529.                  mcat %name %surname
  1530.                  exit
  1531.  
  1532. Examples:
  1533.                  mcat %fred "abc"
  1534.                  mcat %fred %bill
  1535.  
  1536. See also: set, unset, mkill
  1537.  
  1538. System 2 operating environment   User's Guide - Internal Commands     mkdir
  1539. ---------------------------------------------------------------------------
  1540.  
  1541. Command          mkdir
  1542. Syntax           mkdir <subdirectory>
  1543.  
  1544. The mkdir command creates a new subdirectory on the disk with the given
  1545. name. By default, the directory is created within the current directory.
  1546. This is similar to choosing 'Create New Folder' under the GEM desktop.
  1547.  
  1548. Examples
  1549.                  mkdir user
  1550.                  mkdir b:\database\files.dat
  1551.  
  1552. See also: cd, rmdir
  1553.  
  1554. System 2 operating environment   User's Guide - Internal Commands     mkill
  1555. ---------------------------------------------------------------------------
  1556.  
  1557. Command          mkill
  1558. Syntax           mkill
  1559.  
  1560. The mkill command will remove all macros and variables. It is equivalent
  1561. to using unset on each individual macro or variable
  1562.  
  1563. Example:
  1564.                  mkill
  1565.  
  1566. See also: unset, set, mcat
  1567.  
  1568. System 2 operating environment   User's Guide - Internal Commands        mv
  1569. ---------------------------------------------------------------------------
  1570.  
  1571. Command          mv
  1572. Syntax           mv <oldfilename> <newfilename>
  1573.  
  1574. The mv command (standing for move) allows files to be renamed. The
  1575. specified file <oldfilename> is given the name <newfilename>. The contents
  1576. of the file remain unchanged. No wildcards are allowed.
  1577.  
  1578. Examples:
  1579.                  mv fred.wp fred.doc
  1580.                  mv thing.tmp prog.c
  1581.  
  1582. Notes:
  1583.  
  1584. Files cannot be renamed across physical devices (ie disk drives), so the
  1585. command mv a:fred.doc b:fred.doc would not be valid. This command is
  1586. exactly equivalent to ren.
  1587.  
  1588. See also: ren, cp 
  1589.  
  1590. System 2 operating environment   User's Guide - Internal Commands  notequal
  1591. ---------------------------------------------------------------------------
  1592.  
  1593. Command          notequal
  1594. Syntax           notequal <string1> <string2>
  1595.  
  1596.  
  1597. The notequal command returns a value of false (-1) if <string2> is the same
  1598. as <string1>, or true (0) if it isn't. It is intended for use with the if
  1599. command, for example,
  1600.  
  1601.        if notequal %birdname "puffin" ; echo "Not puffin" ; echo ; endif
  1602.  
  1603. would print 'Not puffin' on the screen if the variable %birdname was not
  1604. equal to the string 'puffin'. All tests are case sensitive.
  1605.  
  1606. Examples:
  1607.  
  1608.   notequal "fred" "fred"                             returns -1
  1609.   notequal "Fred" "fred"                             returns 0
  1610.   notequal "fred" fred                               returns 0
  1611.   notequal "fred" "james"                            returns -1
  1612.   notequal fred fred                                 returns -1
  1613.  
  1614. Notes:
  1615.  
  1616. All tests are case sensitive, so "FRED" will not match 'Fred','fred', etc.
  1617.  
  1618. See also: equal, contains, istrue
  1619.  
  1620. System 2 operating environment   User's Guide - Internal Commands      path
  1621. ---------------------------------------------------------------------------
  1622.  
  1623. Command          path
  1624. Syntax           path [<pathname>]
  1625.  
  1626. The path command changes the default directory for executable programs (such
  1627. as bombs) to the given pathname. For example, if you had a utility fred.ttp
  1628. in subdirectory \bin, then after typing
  1629.  
  1630.                  path \bin
  1631.  
  1632. you could just type
  1633.  
  1634.                  fred
  1635.  
  1636. to execute the program, instead of
  1637.  
  1638.                  \bin\fred
  1639.  
  1640. Note that if any colons(:) or backslashes (\) appear in the program name when
  1641. typed in to be executed, the default pathname will be overridden
  1642.  
  1643. See also: pwd
  1644.  
  1645. System 2 operating environment   User's Guide - Internal Commands        pr
  1646. ---------------------------------------------------------------------------
  1647.  
  1648. Command          pr
  1649. Syntax           pr [-[l<x>s<x>i<x>t] [<title>]] [<filespec>]
  1650.  
  1651. pr is a flexible command that allows a text file to be formatted. The
  1652. output is of a form particularly suitable for printing. The filespec
  1653. consists of a filename which can contain wildcards. There are four
  1654. qualifiers which can be specified, details of which are given below.
  1655. The output is by default to standard output.
  1656.  
  1657.     l       The number following this qualifier specifies the length
  1658.             of a page of output, which is used by the s qualifier. The
  1659.             default is 66. The length is given in printed lines.
  1660.     s       The number following the s qualifier specifies the number
  1661.             of lines that are to be left blank at the end of each page
  1662.             (for instance to skip over a page break). The default is 0.
  1663.     i       The number following the i qualifier specifies the number
  1664.             of spaces that are to be output before each line of text,
  1665.             ie the left margin indent. The default is 0.
  1666.     t       Specifies that a title & page numbers are to be printed.
  1667.             If this qualifier is given, then the <title> parameter
  1668.             must be specified, which is the title.
  1669.  
  1670. Examples:
  1671.  
  1672.    pr fred.dat                              The same as cat fred.dat
  1673.    pr -i5 fred.dat                          Show fred.dat with a left
  1674.                                             margin of 5 spaces.
  1675.    pr -l70s10i15 fred.dat                   Show fred.dat with a left
  1676.                                             margin of 15 spaces, and
  1677.                                             use a page length of 70
  1678.                                             lines, missing the last 10
  1679.                                             lines on each page.
  1680.    pr -l60s5t "Data file" fred.dat          Show fred.dat on the screen
  1681.                                             and use a page length of 60
  1682.                                             lines, skipping 5 lines at
  1683.                                             the end of each page, and
  1684.                                             putting the title "Data file"
  1685.                                             & the page number at the top
  1686.                                             of each page.
  1687.    pr -l60s5t "Data file" fred.dat > prn:   As above, but send to the
  1688.                                             printer
  1689.    help index | pr -l70s10                  Pipes output of help into
  1690.                                             pr for formatting.
  1691.  
  1692. Notes:
  1693.  
  1694. pr cannot accept input from the keyboard like cat, since it is line
  1695. orientated.
  1696.  
  1697. See also: cat, type
  1698.  
  1699. System 2 operating environment   User's Guide - Internal Commands      putc
  1700. ---------------------------------------------------------------------------
  1701.  
  1702. Command          putc
  1703. Syntax           putc <n> [<n> <n> ...]
  1704.  
  1705. The putc command translates the given number(s), which should be in the range
  1706. 0-255, into their ASCII character equivalents, which are then sent to the
  1707. standard output. For example,
  1708.  
  1709.                  putc 72 69 76 76 79
  1710.  
  1711. displays HELLO on the screen, since ASCII 72='H', ASCII 69='E', etc.
  1712.  
  1713. One major application of putc is in the writing of control codes. For example,
  1714. in order to be put into emphasised text mode, most Epson compatible printers
  1715. need to be sent a sequence of control codes as ASCII characters, namely
  1716. character 27 followed by character 69 (ESC E). So, to put your printer into
  1717. emphasised mode, you could type
  1718.  
  1719.                  putc 27 69 > prn:
  1720.  
  1721. See also: getc, echo, cat, pr
  1722.  
  1723. System 2 operating environment   User's Guide - Internal Commands       pwd
  1724. ---------------------------------------------------------------------------
  1725.  
  1726. Command          pwd
  1727. Syntax           pwd
  1728.  
  1729. The pwd command displays the letter of the current disk drive, and the
  1730. current subdirectory that you are in. It basically reminds you which
  1731. subdirectory you are in, if any.
  1732.  
  1733. Example session:
  1734.  
  1735. $ pwd
  1736. Current directory path is A:\
  1737. $ drive b
  1738. $ pwd
  1739. Current directory path is B:\
  1740. $ cd bin
  1741. $ pwd
  1742. Current directory path is B:\BIN\
  1743.  
  1744. Notes:
  1745.  
  1746. pwd is a 'Unixism', and stands for print working directory.
  1747.  
  1748. See also: cd, drive
  1749.  
  1750. System 2 operating environment   User's Guide - Internal Commands      quit
  1751. ---------------------------------------------------------------------------
  1752.  
  1753. Command          quit
  1754. Syntax           quit
  1755.  
  1756. The quit command will restore the colours to their values before System2
  1757. was started, and will return to the desktop or calling program
  1758.  
  1759. Example:
  1760.                  quit
  1761.  
  1762. System 2 operating environment   User's Guide - Internal Commands       ren
  1763. ---------------------------------------------------------------------------
  1764.  
  1765. Command          ren
  1766. Syntax           ren <oldfilename> <newfilename>
  1767.  
  1768. The ren command allows files to be renamed. The specified file
  1769. <oldfilename> is given the name <newfilename>. The contents of the file
  1770. remain unchanged. No wildcards are allowed.
  1771.  
  1772. Examples:
  1773.                  ren fred.wp fred.doc
  1774.                  ren thing.tmp prog.c
  1775.  
  1776. Notes:
  1777.  
  1778. Files cannot be renamed across physical devices (ie disk drives), so the
  1779. command ren a:fred.doc b:fred.doc would not be valid. This command is
  1780. exactly equivalent to mv.
  1781.  
  1782. See also: mv, cp 
  1783.  
  1784. System 2 operating environment   User's Guide - Internal Commands    result
  1785. ---------------------------------------------------------------------------
  1786.  
  1787. Command          result
  1788. Syntax           result
  1789.  
  1790. The result command displays on the standard output the value returned by
  1791. the last command executed.System2 commands usually return 0 or more
  1792. to mean successful completion, -1 to mean error, and -2 to mean that a
  1793. syntax message was output.
  1794.  
  1795. Example:
  1796.                  result
  1797.  
  1798. Notes:
  1799.  
  1800. This command is equivalent to typing echo %result.
  1801.  
  1802. System 2 operating environment   User's Guide - Internal Commands        rm
  1803. ---------------------------------------------------------------------------
  1804.  
  1805. Command          rm
  1806. Syntax           rm <filespec>
  1807.  
  1808. This command is used to remove disk files that are no longer needed. A
  1809. removed file CANNOT BE RECOVERED.
  1810.  
  1811. The filespec parameter can be a single filename, in which case the given
  1812. file is deleted, or a wildcard, in which case all files that match the
  1813. specification are deleted.
  1814.  
  1815. Obviously, this command must be used with great care. If you wish, the
  1816. command DEL can be used in place of RM.
  1817.  
  1818. Examples:
  1819.                  rm fred.doc
  1820.                  rm *.c
  1821.  
  1822. See also: del, rmdir
  1823.  
  1824. System 2 operating environment   User's Guide - Internal Commands     rmdir
  1825. ---------------------------------------------------------------------------
  1826.  
  1827. Command          rmdir
  1828. Syntax           rmdir <subdirectory>
  1829.  
  1830. The rmdir command removes an empty subdirectory from the disk. To delete a
  1831. subdirectory with files in it, the files within the subdirectory must first
  1832. be removed (using the rm command) before the rmdir command is issued.
  1833.  
  1834. Examples:
  1835.  
  1836.                  rmdir documents
  1837.                  rmdir source\c_code
  1838.  
  1839. See also: cd, mkdir, rm
  1840.  
  1841. System 2 operating environment   User's Guide - Internal Commands       set 
  1842. ---------------------------------------------------------------------------
  1843.  
  1844. Command          set
  1845. Syntax           set [<macro>[ = | : ][<value]]
  1846.  
  1847. The set command controls the assigning of variables and macros, and is a
  1848. fairly complex command.
  1849. If issued without any parameters, set will respond with a list of the
  1850. current values of all system variables, followed by a list of all macros
  1851. and user defined variables if any exist.
  1852.  
  1853. Set allows values to be assigned to either system variables, macros or
  1854. user defined variables. The single parameter consists of a variable name,
  1855. followed by an = or a : , then the value that the variable is to take.
  1856. If the separator is an = sign, then an attempt will be made to evaluate
  1857. the value to a numeric expression (see eval), so, for example, 3*6 would
  1858. yield a value of 18. However, if the separator is a colon (:), the
  1859. value will be interpreted as a direct string, so 3*6 would yield a value
  1860. of "3*6". If a value is being assigned to a system variable, then the
  1861. separator type is arbitrary: the value is interpreted according to the
  1862. sort of value the system variable holds.
  1863.  
  1864. If no value is given, then the specified macro or variable is de-assigned,
  1865. as with the unset command.
  1866.  
  1867. Examples:
  1868.  
  1869.   set                                   Produces a list of variables
  1870.   set edit:"a:\bin\me"                  Make macro edit equal to the string
  1871.                                         "a:\bin\me"
  1872.   set %fred=%age+20                     Makes variable %fred with a value
  1873.                                         20 more than the value of %age
  1874.   set %fred:"%age+20"                   Makes variable %fred equivalent to
  1875.                                         the string "%age+20"
  1876.   set %fred=                            De-assign variable %fred
  1877.  
  1878. Notes:
  1879.  
  1880. There must be no spaces around the = or : sign. 
  1881.  
  1882. See also: unset, mcat, mkill,incr, decr, eval
  1883.  
  1884. System 2 operating environment   User's Guide - Internal Commands      time
  1885. ---------------------------------------------------------------------------
  1886.  
  1887. Command          time
  1888. Syntax           time [<hh> <mm> <ss>]
  1889.  
  1890. The time command will display the current time, or will allow the time to
  1891. be set if the three parameters (corresponding to hours, minutes, seconds)
  1892. are supplied. The hours are given in 24 hour format (0-23)
  1893.  
  1894.  
  1895. Examples:
  1896.                  time
  1897.                  time 7 41 30
  1898.                  time 23 31 28
  1899.  
  1900. See also: date
  1901.  
  1902. System 2 operating environment   User's Guide - Internal Commands      true
  1903. ---------------------------------------------------------------------------
  1904.  
  1905. Command          true
  1906. Syntax           true
  1907.  
  1908. This command returns the value true (0).
  1909.  
  1910. See also: false
  1911.  
  1912. System 2 operating environment   User's Guide - Internal Commands      type
  1913. ---------------------------------------------------------------------------
  1914.  
  1915. Command          type
  1916. Syntax           type <filename1> [<filename2> ... ]
  1917.  
  1918. The type command displays the contents of each disk file specified. The
  1919. filenames cannot contain any wildcards.
  1920.  
  1921. Examples:
  1922.                  type customer.rec
  1923.                  type test1.c test2.c test3.c
  1924.                  type test4.c > prn:
  1925.  
  1926.  
  1927. Notes:
  1928.  
  1929. Pressing CONTROL S and CONTROL Q during displaying a file on the screen will
  1930. cause the screen to freeze and be released, enabling text to be viewed
  1931. before it scrolls off the screen. Do not press CONTROL C during output, or
  1932. else you may be aborted to the desktop.
  1933.  
  1934. See also: cat, pr
  1935.  
  1936. System 2 operating environment   User's Guide - Internal Commands     unset
  1937. ---------------------------------------------------------------------------
  1938.  
  1939. Command          unset
  1940. Syntax           unset <macro>
  1941.  
  1942. The unset command allows a macro or variable to be disposed of. The contents
  1943. and store are lost.
  1944.  
  1945. Examples:
  1946.                  unset %fred
  1947.                  unset edit
  1948.  
  1949. Notes:
  1950.  
  1951. System variables cannot be unset
  1952.  
  1953. See also: mkill, set
  1954.  
  1955. System 2 operating environment   User's Guide - Internal Commands       xsl
  1956. ---------------------------------------------------------------------------
  1957.  
  1958. Command          xsl
  1959. Syntax           xsl <filename> [<param1> ... <param9>]
  1960.  
  1961. The xsl command will execute an xsl program with the given filename. The
  1962. file must have the extension .XSL. The optional parameters are passed
  1963. to the program as variables %1 to %9. There can be between 0 and 9
  1964. parameters, the number of which is stored in a temporary variable %argc.
  1965.  
  1966. Examples:
  1967.  
  1968.                  xsl dobackup
  1969.                  xsl deldir cprogs.c
  1970.                  xsl newecho "ABC" 123 ABC123 %fred
  1971.  
  1972. Notes:
  1973.  
  1974. This command is exactly equivalent to $. This command cannot be used
  1975. within an XSL program.
  1976.  
  1977.  
  1978. See also: $
  1979.  
  1980. System 2 operating environment   User's Guide - Internal Commands         .
  1981. ---------------------------------------------------------------------------
  1982.  
  1983. Command          .
  1984. Syntax           . <label>
  1985.  
  1986. The . command is followed by a label which is used by the goto command
  1987. in xsl programs. See goto for more details.
  1988.  
  1989. Examples:
  1990.                  . loop
  1991.                  . do_exit
  1992.  
  1993. See also: goto, xsl
  1994.  
  1995. System 2 operating environment   User's Guide - Internal Commands         $
  1996. ---------------------------------------------------------------------------
  1997.  
  1998. Command          $
  1999. Syntax           $ <filename> [<param1> ... <param9>]
  2000.  
  2001. The $ command will execute an xsl program with the given filename. The
  2002. file must have the extension .XSL. The optional parameters are passed
  2003. to the program as variables %1 to %9. There can be between 0 and 9
  2004. parameters, the number of which is stored in a temporary variable %argc.
  2005.  
  2006. Examples:
  2007.  
  2008.                  $ dobackup
  2009.                  $ deldir cprogs.c
  2010.                  $ newecho "ABC" 123 ABC123 %fred
  2011.  
  2012. Notes:
  2013.  
  2014. This command is exactly equivalent to xsl.
  2015.  
  2016. See also: xsl
  2017.  
  2018. System 2 operating environment   User's Guide - Internal Commands         *
  2019. ---------------------------------------------------------------------------
  2020.  
  2021. Command          *
  2022. Syntax           * <string>
  2023.  
  2024. The * command completely ignores any parameters that follow it. It is
  2025. meant for placing comments in xsl programs, like the good old BASIC
  2026. REM statement.
  2027.  
  2028. Examples:
  2029.                  * This is a load of rubbish
  2030.                  * Interesting comments
  2031.  
  2032. See also: xsl
  2033.  
  2034. System 2 operating environment   User's Guide - External Commands      help
  2035. ---------------------------------------------------------------------------
  2036.  
  2037. Command          HELP
  2038. Syntax           HELP <topic>|FULL
  2039.  
  2040. Displays help information on the specified topic, or shows the full manual
  2041. if FULL is specified. A topic of ? gives a title page, and INDEX shows
  2042. an index to the manual. The file MANUAL. must be in the root directory
  2043. of the current disk.
  2044.  
  2045. System 2 operating environment   User's Guide - External Commands     bombs
  2046. ---------------------------------------------------------------------------
  2047.  
  2048. Command          BOMBS
  2049. Syntax           BOMBS
  2050.  
  2051. This produces an exception analysis after a 68000 bomb out.
  2052.  
  2053. System 2 operating environment   User's Guide - External Commands      tl50
  2054. ---------------------------------------------------------------------------
  2055.  
  2056. Command          TL50
  2057. Syntax           TL50
  2058.  
  2059. This changes the screen to 50 line mode. It is for MONO MONITOR use only,
  2060. and should be followed by a CLEAR command.
  2061.  
  2062. See also: tl25
  2063.  
  2064. System 2 operating environment   User's Guide - External Commands      tl25
  2065. ---------------------------------------------------------------------------
  2066.  
  2067. Command          TL25
  2068. Syntax           TL25
  2069.  
  2070. The TL25 command restores the screen to a 50 line mode after a tl50
  2071. command. It should be followed by a CLEAR command.
  2072.  
  2073. See also: tl50
  2074.  
  2075. System 2 operating environment   User's Guide - Internal Commands  glossary
  2076. ---------------------------------------------------------------------------
  2077.  
  2078.  
  2079.                                  GLOSSARY
  2080.                                  --------
  2081.  
  2082.  
  2083. Directory       Either the 'root directory' which is the default, top level
  2084.                 directory that contains all subdirectories, and is
  2085.                 referenced by the name '\', or a subdirectory
  2086.  
  2087. Filename        The name given to a file on the disk, displayed under it's
  2088.                 icon in GEM.
  2089.  
  2090. Filespec        A filename or pathname that can contain wildcards
  2091.  
  2092. Pathname        A filename that also specifies the drive &/or directory
  2093.                 where a file lies. The general format is
  2094.                   [<drive>:][<directory>\ ...]<file>
  2095.                 eg: a:\bin\me
  2096.                 or  \bin\fred
  2097.                 or  d:
  2098.                 or  a:\
  2099.                 or  \
  2100.                 Most filenames in System2 can be given as pathnames
  2101.  
  2102. Stdin,Stdout,
  2103. Stderr          See section on redirection
  2104.  
  2105. String          A string is a collection of characters, numbers, etc.
  2106.  
  2107. Subdirectory    Same as a folder under GEM. A subdirectory has the same
  2108.                 format as a pathname.
  2109.  
  2110. Wildcard        A special character - * or ? - used in a filespec, to
  2111.                 enable more than one file to be referenced by one
  2112.                 filespec. * stands for any number of any character, and
  2113.                 ? stands for one of any character. So *.* matches all
  2114.                 files, *.doc matches all files with extension doc, a*.*
  2115.                 matches all files starting with a, chapt?.doc matches
  2116.                 chapt1.doc, chapt2.doc, chaptx.doc, etc.
  2117.  
  2118.